﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class ExitUIControl : MonoBehaviour
{

    public GameObject canvas;

    
    void Update()
    {
        if (canvas != null)
        {
            if (Input.GetKeyUp(KeyCode.Escape))
            {
                swichVisibility();
            }
        }
    }

    public void swichVisibility() {
        canvas.SetActive(!canvas.activeSelf);
    }
}
